package cn.yi.medicalsys.pojo;

import java.util.ArrayList;
import java.util.List;

public class PageBean<E> {
	private int currPageNo=1;//当前页码
	private int pageSize;//每页显示的记录数
	private int totalCount;//总记录数
	private int totalPageCount;//总页数
	private List<E> list=new ArrayList<E>();//每页显示的数据
	
	public int getCurrPageNo() {
		return currPageNo;
	}
	public void setCurrPageNo(int currPageNo) {
		this.currPageNo = currPageNo;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		if(totalCount>0){
			this.totalCount=totalCount;
			int temp=this.totalCount/this.pageSize;
			this.totalPageCount=this.totalCount % this.pageSize==0? temp:temp+1;
		}
	}
	public int getTotalPageCount() {
		return totalPageCount;
	}
	/*public void setTotalPageCount(int totalPageCount) {
		this.totalPageCount = totalPageCount;
	}*/
	public List<E> getList() {
		return list;
	}
	public void setList(List<E> list) {
		this.list = list;
	}
	public PageBean(int currPageNo, int pageSize, int totalCount,
			int totalPageCount, List<E> list) {
		super();
		this.currPageNo = currPageNo;
		this.pageSize = pageSize;
		this.totalCount = totalCount;
		this.totalPageCount = totalPageCount;
		this.list = list;
	}
	public PageBean() {
		super();
	}
	public PageBean(int currPageNo, int pageSize, int totalCount,
			int totalPageCount) {
		super();
		this.currPageNo = currPageNo;
		this.pageSize = pageSize;
		this.totalCount = totalCount;
		this.totalPageCount = totalPageCount;
	}
	
}
